package kr.hkit.powerjava.chapter22.work2;

public class Student {
private int stdNum;
private String stdName;
private int kor;
private int eng;
private int math;

public Student(int stdNum, String stdName, int kor, int eng, int math) {
	super();
	this.stdNum = stdNum;
	this.stdName = stdName;
	this.kor = kor;
	this.eng = eng;
	this.math = math;
}
public Student(int stdNum, String stdName) {
	super();
	this.stdNum = stdNum;
	this.stdName = stdName;
}
public int getStdNum() {
	return stdNum;
}
public void setStdNum(int stdNum) {
	this.stdNum = stdNum;
}
public int getKor() {
	return kor;
}
public String getStdName() {
	return stdName;
}
public void setStdName(String stdName) {
	this.stdName = stdName;
}
public void setKor(int kor) {
	this.kor = kor;
}
public int getEng() {
	return eng;
}
public void setEng(int eng) {
	this.eng = eng;
}
public int getMath() {
	return math;
}
public void setMath(int math) {
	this.math = math;
}
public double getToral(){
	return kor + eng + math;
	
}

public double getAng(){
	return getToral()/3;
}

@Override
public boolean equals(Object obj) {
	Stdent std = (Stdent)obj;
	return(srdNum = std.stdNum && stdName.equals(std.Name));
	
@Override
public String toString() {
	return String
			.format("%5s \t%3s \t%3s \t%3s \t%3s \t%3s \t%3s]",
					stdNum, stdName, kor, eng, math, getToral(), getAng());
}


}



